package com.zero.guava.samples.EventBus;

import com.google.common.eventbus.Subscribe;

/**
 * 继承关系的event
 */
public class FruitEaterListener {

    @Subscribe
    public void eat(Fruit event){
        System.out.println("Fruit eat[{"+event+"}].");
    }

    @Subscribe
    public void eat(Apple event){
        System.out.println("Apple eat[{"+event+"}].");
    }
}
